package com.yyjj.zixun.adapter;

import android.os.Bundle;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yyjj.zixun.R;
import com.yyjj.zixun.activity.GanTouDetailsActivity;
import com.yyjj.zixun.entity.BiZiXunEntity;
import com.yyjj.zixun.entity.TouJiaoGanHuoEntity;

import tech.com.commoncore.utils.FastUtil;
import tech.com.commoncore.utils.OnNoDoubleClickListener;

public class GanTouAdapter extends BaseQuickAdapter<TouJiaoGanHuoEntity, BaseViewHolder> {


    public GanTouAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(final BaseViewHolder helper, final TouJiaoGanHuoEntity item) {

//        ImageView iv = (ImageView) helper.getView(R.id.img);
//        GlideManager.loadImg(item.getLogo(), iv, R.mipmap.ic_launcher);

        helper.setText(R.id.tv_title, item.getPost_title());
        helper.itemView.setOnClickListener(new OnNoDoubleClickListener() {
            @Override
            public void onNoDoubleClick(View v) {
                Bundle bundle = new Bundle();
                bundle.putSerializable("id",item.getId()+"");
                FastUtil.startActivity(mContext,GanTouDetailsActivity.class,bundle);
            }
        });

    }
}
